/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  23 May 2008 12:50:12 pm

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.11

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

#ifndef __JUCER_HEADER_KETONAL_KETONAL_9882651A__
#define __JUCER_HEADER_KETONAL_KETONAL_9882651A__

//[Headers]     -- You can add your own extra header files here --
#include "FileUpload.h"
#include <juce.h>
#include "CircularProgress.h"
#include "UploadThread.h"
#include "KetonalConfig.h"
#include "KetonalSettings.h"
#include "FileDropTargetWindow.h"
#include "KetonalTrayIcon.h"
#include "KetonalSettingsWindow.h"
//[/Headers]



//==============================================================================
/**
                                                                    //[Comments]
    An auto-generated component, created by the Jucer.

    Describe your class and how it works here!
                                                                    //[/Comments]
*/
class Ketonal  : public Component,
                 public FileDragAndDropTarget,
                 public ChangeListener,
                 public Timer
{
public:
    //==============================================================================
    Ketonal (KetonalSettings *_s);
    ~Ketonal();

    //==============================================================================
    //[UserMethods]     -- You can add your own custom methods in this section.
	void mouseDown (const MouseEvent& e);
	void mouseDrag (const MouseEvent& e);
	bool isInterestedInFileDrag (const StringArray &files);
	void fileDragEnter (const StringArray &files, int x, int y);
	void fileDragMove (const StringArray &files, int x, int y);
	void fileDragExit (const StringArray &files);
	void filesDropped (const StringArray &files, int x, int y);
	void changeListenerCallback (void *objectThatHasChanged);
	void timerCallback();
	void trayDoubleClick();
	void closeOptions();
	KetonalSettings *getSettings();
	void cacheConfigs();
	bool clearConfigs();
	void syncConfigs();
    //[/UserMethods]

    void paint (Graphics& g);
    void resized();

    // Binary resources:
    static const char* ketonal_main_bg_png;
    static const int ketonal_main_bg_pngSize;
    static const char* tray_png;
    static const int tray_pngSize;

    //==============================================================================
    juce_UseDebuggingNewOperator

private:
    //[UserVariables]   -- You can add your own custom variables in this section.
	ComponentDragger myDragger;
	double progress;
	GlowEffect glow;
	ThreadPool *uploadThreadPool;
	int maxJobs;
	OwnedArray <FileDropTargetWindow>dropTargets;
	KetonalTrayIcon *trayIcon;
	KetonalSettingsWindow *ketonalSettings;
	KetonalSettings *settings;
	TooltipWindow tooltip;
	OwnedArray <KetonalConfig> configList;

    //[/UserVariables]

    //==============================================================================
    Label* label;
    Label* ketonalWindowOutput;
    Image* internalCachedImage1;

    //==============================================================================
    // (prevent copy constructor and operator= being generated..)
    Ketonal (const Ketonal&);
    const Ketonal& operator= (const Ketonal&);
};


#endif   // __JUCER_HEADER_KETONAL_KETONAL_9882651A__
